<!DOCTYPE html>
<html>
	<head>
	  	<meta charset="UTF-8">
		<script src="../../public/js/tmpl.js"></script>
		<script>
			var content = template('Phead_resource', {
				title: '订单信息'
			});
			document.write(content);
		</script>
	</head>
	<body class="wrap_bg order_detail">
	
		
		<section class="cont_info">
			
		</section>
		
		<!--底部按钮-->
		<footer class="footer_nav">
			<a href="./refund_info.html" class="am-text-center padding10 active_bg color-white am-block bottom_btn">
				<span class="am-text-sm">点击取消预约</span>
			</a>
		</footer>
		
		<script>
			var content = template('progress_status', {});
			document.write(content);
		</script>
		
		<script>
			var content = template('Pfoot_resource', {});
			document.write(content);
		</script>
		
		<script id="data_info" type="text/html">
			
			<ul class="ul_box  bgs0 marginb10 ">
				<li class="li_item  padding-v10">
					<h1 class="color-white am-text-center">单车私教活动课</h1>
				</li>
				
				<li class="li_item border-bottom-grey padding-v10">
					<span class="color-white">{{info.date_time}}</span>
					<!--<span class="am-icon-angle-right am-icon-fw"></span>-->
				</li>
				<li class="li_item padding-v10">
					<span class="color-white padding0">支付金额: </span>
					<span class="color-white padding0">{{info.still_pay}}元</span>
				</li>
				<li class="li_item padding-v10 border-bottom-grey">
					<span class="color-white padding0">入场方式: </span>
					<span class="color-white padding0">扫描门禁二维码进入健身</span>
				</li>
				<li class="li_item padding-v10 ">
					<div class="am-text-center  padding10">
				    	<img src="../../public/img/icon/qr-code1.png" alt="" />
				    	<p>
					    	<span>保存二维码分享给好友，</span>
					    	<span>邀请好友一起健身吧</span>
				    	</p>
				    </div>
				</li>
			</ul>
			<div class="bgwhite padding10">
				<h2><b>地址:</b></h2>
				<p>杭州市西湖区文一西路138号春田花花小区</p>
				<h2 class="am-margin-top-lg"><b>注意:</b></h2>
				<ul>
					<li>1.运动装备:适合贴身的运动服饰，避免衣服宽松造成对动作的影响。双脚要穿双软底舒适、防滑耐磨的运动鞋。</li>
					<li>2.运动装备:适合贴身的运动服饰，避免衣服宽松造成对动作的影响。双脚要穿双软底舒适、防滑耐磨的运动鞋。</li>
					<li>3.运动装备:适合贴身的运动服饰，避免衣服宽松造成对动作的影响。双脚要穿双软底舒适、防滑耐磨的运动鞋。</li>
				</ul>
			</div>
			
			
		</script>
		
		<script type="text/javascript">
		
			(function($, arttmpl){
			
				var info = {
					name:'燃脂搏击',
					date_time:'9月18日 11:15-12:25',
					address:'杭州市上城区建国路228号钱江时代大厦对面莲花超市旁杭州市第二人民医院',
					numb_Of_personels:[
						{num:'1',price:'69'},
						{num:'2',price:'138'},
						{num:'3',price:'207'}
					],
					total_price:'69',
					card_isOPen:false,
					discount_price:'69',
					numOf_cashCoupon:0,
					still_pay:'69',
					tip:'开始时间前6个小时前取消预约，住房金额退款；开始时间前6个小时后取消预约，不支持退款。',
					timeOver_long:'1'
				}
			
				var drawInfo = function(data){
					var d = {
						info:data
					};
					
					var content =arttmpl('data_info', d);
					$('.cont_info').html(content);
					
					
					/*绑定事件*/
					var btns = $('.cont_info').find('.btnState_group button');
					
					btns.click(function(){
						
						var i = btns.index($(this))+1;
						var price = $(this).attr('data-price');
						var $price = $('.cont_info').find('.total_price');
						
						$(this).addClass('on').siblings('button').removeClass('on');
						
						$price.html(price);
						
					});
				}
				
				/*成功回调*/
				var successcallback_Info = function(res){
					drawInfo(res)
				}
				
				/*失败回调*/
				var errorcallback = function(statuscode, statusmsg) {
					console.log(statuscode + "  " + statusmsg);
				};
				/*失败回调*/
				var faildcallback = function(xhr, errtype, errthow) {
					console.log(xhr.readyState + "  " + xhr.status + "  " + xhr.statusText);
				};
				
				/*请求数据*/
				var getInfo = function(op, sucessCallback, errorcallback, faildcallback){
					request('url', 't', 'd', info, sucessCallback, errorcallback, faildcallback);
				}
				
				var init = function(){
					getInfo('op', successcallback_Info, errorcallback, faildcallback)
					var $modal = $('#my-modal-loading');
					$modal.hide();
				}
				
				init();
			
			})(jQuery, template);
		
			$(function(){
				$('.bottom_btn').click(function(){
					window.location='../common/register.html'
				})
			})
		</script>
	</body>
</html>
